package com.niiwoo.civet.mobile.vo.response.loan;

import com.niiwoo.civet.trade.dto.common.SpeedLoanRateConfigDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Setter
@Getter
@ApiModel
public class SpeedLoanConfigResponseVO implements Serializable {
    private static final long serialVersionUID = 862389125349774590L;

    @ApiModelProperty(value="最高借款金额")
    private BigDecimal maxLoanAmount;

    @ApiModelProperty(value="最低借款金额")
    private BigDecimal minLoanAmount;

    @ApiModelProperty(value="可选借款期限")
    private List<Integer> deadlineList;

    @ApiModelProperty(value="借款可选标题")
    private List<String> loanTitleList;

    @ApiModelProperty(value="期限对应的利率配置")
    private List<SpeedLoanRateConfigVO> paramsRateList;

    @ApiModelProperty(value="借款期限限制列表")
    private List<DeadLineConfig> deadLineConfigList;

    @ApiModelProperty(value="授信总额度")
    private BigDecimal creditTotalLoanAmount;

    @Setter
    @Getter
    public static class SpeedLoanRateConfigVO {

        @ApiModelProperty(value="还款方式（1到期还本息，2等额本息，3按月还息，到期还本）")
        private Byte repaymentType;

        @ApiModelProperty(value="借款期限")
        private Integer borrowMonth;

        @ApiModelProperty(value="平台管理费率(即信用保费率)")
        private BigDecimal platformManageFeeRate;

        @ApiModelProperty(value="默认借款费率")
        private BigDecimal loanRate;

        @ApiModelProperty(value="平台服务费率")
        private BigDecimal platformServiceFeeRate;

        @ApiModelProperty(value="担保服务费率")
        private BigDecimal commissionGuaranteRate;

        @ApiModelProperty(value="预仲裁服务费率")
        private BigDecimal arbitrationServiceFeeRate;

    }

    @Setter
    @Getter
    public static class DeadLineConfig {

        @ApiModelProperty(value="最小借款金额")
        private BigDecimal minAmount;

        @ApiModelProperty(value="最大借款金额")
        private BigDecimal maxAmount;

        @ApiModelProperty(value="借款期限数组")
        private List<Integer> deadLineList;

    }
}
